package com.zp.datax.core;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 过虑器
 *
 * @author bruce
 * @date 2019-07-15
 */
public interface Handler {

    Object[] handler(String str);

    default Object[] handler(Handler handler, String str) {

        if (handler == null) {
            return new Object[]{};
        }

        return handler.handler(str);
    }

    default Matcher matcher(Pattern pattern, String str) {
        return pattern.matcher(str);
    }
}
